<template>
  <div>
    <div class="d1">
      <p>子组件展示-----身高：{{modelValue}}-----年龄：{{age}}</p>
      <button @click="add">添加</button>
    </div>
  </div>
</template>

<script setup>

let props = defineProps({
  modelValue: Number,
  age: Number
})

const emit = defineEmits(['update:modelValue', 'update:age'])
const add = () => {
  let aa = props.modelValue
  let bb = props.age
  aa++
  bb++
  emit('update:modelValue', aa)
  emit('update:age', bb)
}

</script>
<style scoped lang ='less'>
</style>